package com.jgj.zxkj.lookandcheckjggroupinfo.app;

import android.app.Application;

import com.jgj.zxkj.lookandcheckjggroupinfo.R;
import com.joanzapata.iconify.fonts.FontAwesomeModule;
import com.orhanobut.logger.AndroidLogAdapter;
import com.orhanobut.logger.Logger;
import com.sa.all_cui.mix_core.app.MIX;
import com.sa.all_cui.mix_core.net.interceptors.DebugInterceptor;
import com.sa.all_cui.mix_core.screenfit.ScreenFitHelper;
import com.sa.all_cui.mix_core.utils.storage.simpledisk.DiskLruCacheHelper;
import com.squareup.leakcanary.LeakCanary;

/**
 * Created by all-cui on 2017/10/26.
 */

public class App extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Logger.addLogAdapter(new AndroidLogAdapter());
        MIX.init(this)
                .withHostApi("http://192.168.1.107:8080/wjzydlshxt/pda/")
                .withInterceptor(new DebugInterceptor("test", R.raw.test))
                .withIcon(new FontAwesomeModule())
                .configure();
        if (LeakCanary.isInAnalyzerProcess(this)) {
            // This process is dedicated to LeakCanary for heap analysis.
            // You should not init your app in this process.
            return;
        }
        LeakCanary.install(this);
        ScreenFitHelper.create(this).activate();
        DiskLruCacheHelper.init().build();
    }
}
